﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using iTeachSoft.Code.Utility;

namespace iTeachSoft.Presentation.Code.Utility
{
    public class ParseUtility
    {
        public static int CheckValue(TextBox textBoxValue)
        {
            int value = -1;
            int.TryParse(textBoxValue.Text, out value);
            if (value < 0)
                AlertUtility.ShowError("Not a valid number!");

            return value;
        }
    }
}
